PATH
WebObjects 4.0 Documentation >
WebObjects Tools and Techniques
Table of Contents
Previous Section
Setting Up a Next-Page Callback
For query pages, you must create a component implementing the QueryPageInterface, and this component must create a callback object (an object that implements the NextPageCallback interface) that is pushed back into the page with the component is returned. When the submit button is clicked for the query (Query DB), the callback method is invoked.Here is an example of how to provide a callback:
public WOComponent d2wList() {
QueryPageInterface qpi=D2W.factory().queryPageForEntityNamed("Movie",
session());
qpi.setNextPageCallback(new NextPageCallback() {
public WOComponent nextPage(WOComponent sender) {
EODataSource=((QueryPageInterface)sender).queryDataSource();
myDisplayGroup.setDataSource(dataSource);
movieDisplayGroup.fetch();
return MyComponent.this;
}
});
return (WOComponent) qpi;
}
Table of Contents
Next Section